#!/usr/bin/env python
# coding: utf-8

# 写一个程序计算对于给定的n(n>0)，计算1/2+2/3+3/4+…+n/n+1，保留两位小数。
# 
# 输入：`n=5`
# 
# 预期输出：`3.55`
# 
# 

# In[2]:


n = 5
sum = 0
for i in range(1, n + 1):
    sum += i / (i + 1)
print(round(sum, 2))  # rounded to 2 decimal point

